package com.atguigu.test5.test51;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author 路飞
 * @date 2024/4/10 10:21
 * @description 2.	消除下面集合中重复元素？
 */
public class Test2 {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1, 2, 3, 3, 4, 4, 5, 5, 6, 1, 9, 3, 25, 4);

        Set<Integer> set = new HashSet<>(list);
        list = new ArrayList<>(set);
        System.out.println(list);
    }
}
